﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Marmat.Common
{
    /// <summary>
    /// 文件服务
    /// </summary>
    public interface IFileService
    {
        /// <summary>
        /// 下载
        /// </summary>
        /// <param name="sourceFileName">要下载的文件，含路径</param>
        /// <param name="destinationFileName">保存下载文件的文件名和路径</param>
        void Download(string sourceFileName, string destinationFileName);

        /// <summary>
        /// 异步下载
        /// </summary>
        /// <param name="sourceFileName">要下载的文件，含路径</param>
        /// <param name="destinationFileName">保存下载文件的文件名和路径</param>
        void DownloadAsync(string sourceFileName, string destinationFileName);

        /// <summary>
        /// 上传
        /// </summary>
        /// <param name="sourceFileName">要上传的本地文件，含路径</param>
        /// <param name="destinationFileName">目标文件，含路径</param>
        /// <returns></returns>
        bool Upload(string sourceFileName, string destinationFileName);

        /// <summary>
        /// 异步上传
        /// </summary>
        /// <param name="sourceFileName">要上传的本地文件，含路径</param>
        /// <param name="destinationFileName">目标文件，含路径</param>
        void UploadAsync(string sourceFileName, string destinationFileName);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="fileName">要删除的文件，含路径</param>
        void Delete(string fileName);

        /// <summary>
        /// 异步删除
        /// </summary>
        /// <param name="fileName">要删除的文件，含路径</param>
        void DeleteAsync(string fileName);
    }
}
